<template>
  <div>
    <div v-for="(item, index) in imgData" :key="index">
      <img :src="item" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  props: ["value"],
  computed: {
    imgData() {
      if (this.value && this.value !== "") {
        const srcData = JSON.parse(JSON.stringify(this.value)).split(",");
        srcData.forEach((element, index) => {
          srcData[index] = srcData[index] + `?token=${this.$store.state.auth.token}`;
        });
        return srcData;
      } else {
        return [];
      }
    }
  }
};
</script>

<style lang="scss" scoped></style>
